<!doctype html>
<html>
<head>
    <title>添加酒店</title>
    <?php $this->load->module('admin/index/page_header');?>
    <script type="text/javascript">
    window.UEDITOR_HOME_URL = "<?php echo URLPRE.'static/public/Lib/ueditor/';?>";
    </script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/ueditor/ueditor.config.js" charset="utf-8"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/ueditor/ueditor.all.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/ueditor/lang/zh-cn/zh-cn.js" charset="utf-8"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/color/color.js"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/select2/select2.min.js"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/select2/select2_locale_zh-CN.js"></script>
    <link href="<?php echo URLPRE;?>static/public/Lib/select2/select2.css" rel="stylesheet" />
    <link href="<?php echo URLPRE;?>static/public/Lib/select2/select2-bootstrap.css" rel="stylesheet" />
    <!--引入CSS-->
    <link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/public/Lib/webuploader/webuploader.css">
    <!--引入JS-->
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/webuploader/webuploader.js"></script>
</head>
<body>
<div class="wrap">
<div id="home_toptip"></div>
<div class="nav">
    <ul>
        <li><a href="<?php echo $index_url;?>">酒店列表</a></li>
        <li class="current"><a href="javascript:void(0)">添加酒店</a></li>
    </ul>
</div>
<div class="table_full">
<form method="post" class="formvalidate" action="<?php echo $form_url;?>" name="frm">
<div class="nav">
    <ul class="cc tab">
        <li class="current" id="jiben_conf"><a href="javascript:void(0);">基本信息</a></li>
    </ul>
</div>
<div class="table_full">
<table class="tab_label" width="100%" id="jiben_config">
<col class="th" />
<col/>
<tbody>
<tr>
    <th><span class="spanMsg">*</span>酒店名称：</th>
    <td>
        <input type="text" value="" name="Form[name]" class="input rounded" size="60" validate="{required:true}"/>
    </td>
</tr>

<tr>
    <th>*星级：</th>
    <td><select   name="Form[star]" style="width:300px;">
            <option value="1" selected>二星级以下/经济</option>
            <option value="2">三星级/舒适</option>
            <option value="3">四星级/高档</option>
            <option value="3">五星级/豪华</option>
         </select></td>
</tr>


<tr>
    <th>展示缩略图：</th>
    <td class="rowform">
        <ul>
            <li><input type="text" name="Form[thumb]" id="file_url" class="input rounded" value="" style="width:350px" /></li>
            <li><div id="filePicker">选择图片</div></li>
            <li style="color: #ff2222;">图片宽高比为3：2,建议图片大小为(宽)210:(高)140</li>
        </ul>
    </td>
</tr>
<tr>
    <th>展示大图：</th>
    <td class="rowform">
        <ul>
            <li><input type="text" name="Form[banner]" id="file_banner_url" class="input rounded" value="<?php echo $info['banner'];?>" style="width:350px" /></li>
            <li><div id="filePicker_banner">选择图片</div></li>
            <li style="color: #ff2222;">图片宽高比为3：2,建议图片大小为(宽)871:(高)286</li>
        </ul>
    </td>
</tr>
<tr>
    <th>所在城市：</th>
    <td>
        <select name="Form[province]" id="province" onChange="_showdistrict(['continent', 'country', 'province', 'city','area'], 3)">
            <option value="-1" did="-1">选择省</option>
        </select>
        <select name="Form[city]" id="city"  onChange="_showdistrict(['continent', 'country', 'province', 'city','area'], 4)">
            <option value="-1" did="-1">选择市</option>
        </select>
        <select name="Form[area]" validate="{required:true,sel_min:0}" id="area">
            <option value="-1" did="-1">选择区</option>
        </select>
    </td>
</tr>
<tr>
    <th>详细地址：</th><td><input type="text" name="Form[address]" class="input rounded" size="60" validate="{required:true}"/></td>
</tr>
<tr>
    <th>周边地标：</th><td><input type="text" name="Form[around]" class="input rounded"  size="60" validate="{required:true}"/></td>
</tr>
<tr>
    <th><span class="spanMsg">*</span>酒店所在经纬度：</th>
    <td>
        <input type="text" value="" name="Form[longitude]" class="input rounded" size="60" validate="{required:true}"/>(东经 西经,用空格分割)
    </td>
</tr>
<tr>
    <th><span class="spanMsg">*</span>订房电话：</th>
    <td>
        <input type="text" value="" name="Form[tel]" class="input rounded" size="60" validate="{required:true}"/>
    </td>
</tr>
<tr>
    <th>*酒店介绍：</th>
    <td>
        <script id="editor_introduce" name="Form[introduce]" type="text/plain"></script>
    </td>
</tr>
<tr>
    <th>*酒店设施：</th>
    <td>
        <script id="editor_facility" name="Form[facility]" type="text/plain"></script>
    </td>
</tr>
<tr>
    <th>*酒店政策：</th>
    <td>
        <script id="editor_policy" name="Form[policy]" type="text/plain"></script>
    </td>
</tr>
<tr>
    <th>*酒店交通：</th>
    <td>
        <script id="editor_traffic" name="Form[traffic]" type="text/plain"></script>
    </td>
</tr>
<tr>
    <th><span class="spanMsg">*</span>状态</th>
    <td class="rowform">
        <ul>
            <li>
                <label><input type="radio" value="1" name="Form[status]" checked/>启用</label>
            </li>
            <li>
                <label><input type="radio" value="0" name="Form[status]" />禁用</label>
            </li>
        </ul>
    </td>
</tr>
</tbody>
</table>
</div>
<div class="btn_wrap">
    <div class="btn_wrap_pd">
          <button type="submit" class="btn btn_submit J_ajax_submit_btn">提交</button>
    </div>
</div>
</form>
</div>
</div>

<script type="text/javascript">
    //文本编辑器
    UE.getEditor('editor_introduce');
    UE.getEditor('editor_facility');
    UE.getEditor('editor_policy');
    UE.getEditor('editor_traffic');
    //城市
    var district_url = '<?php echo site_url('admin/api/city_fetch/?id=')?>';
    _showdistrict(['continent', 'country', 'province', 'city','area'], 2, 40002, [<?php echo SITEPROVINCE?>, <?php echo SITECITY?> ,0]);
    _showdistrict(['d_continent', 'd_country', 'd_province', 'd_city'],0,null,[0, 0,0,0]);
    //上传图片
    upload_image("<?php echo site_url('admin/upload/ajax_upload');?>",'filePicker','file_url');
    upload_image("<?php echo site_url('admin/upload/ajax_upload');?>",'filePicker_banner','file_banner_url');

</script>
</body>
</html>